package com.cdie.myschool.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cdie.myschool.domain.entity.Calendar;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.Date;

/**
 * @author 朱华扬
 * @date 2022/10/2 18:43
 * @Description
 */
@Mapper
@DS("master")
public interface CalendarMapper extends BaseMapper<Calendar> {
    @Select("select * from calendar cal where #{date} between cal.begin_time and cal.end_time")
    Calendar selectSchoolCalendarByDate(Date date);

}
